-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unskips visualize integration tests #142917
Unskips visualize integration tests #142917
Conversation
Pinging @elastic/kibana-core (Team:Core) |
6a4bf73
to
6b8183e
Compare
@@ -467,7 +467,7 @@ export class CommonPageObject extends FtrService { | |||
async waitForSaveModalToClose() { | |||
this.log.debug('Waiting for save modal to close'); | |||
await this.retry.try(async () => { | |||
if (await this.testSubjects.exists('savedObjectSaveModal')) { | |||
if (await this.testSubjects.exists('savedObjectSaveModal', { timeout: 5000 })) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
increase timeout
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self review
@@ -51,6 +51,16 @@ export class ListingTableService extends FtrService { | |||
return visualizationNames; | |||
} | |||
|
|||
private async getAllSelectableItemsNamesOnCurrentPage(): Promise<string[]> { | |||
const visualizationNames = []; | |||
const links = await this.find.allByCssSelector('.euiTableRow-isSelectable .euiLink'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.euiTableRow .euiLink
matches on an empty table. I chose to add a new method rather than risk affecting other tests that implement the method.
* Navigates through all pages on Landing page and returns array of items names that are selectable | ||
* Added for visualize_integration saved object tagging tests | ||
*/ | ||
public async getAllSelectableItemsNames(): Promise<string[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implements selecting "selectable" items
|
||
}, | ||
{ | ||
"id": "myextratag", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tag for adding to a visualization that's been edited
// Failing: See https://github.com/elastic/kibana/issues/89958 | ||
describe.skip('visualize integration', () => { | ||
await testSubjects.click('confirmSaveSavedObjectButton'); | ||
await retry.waitForWithTimeout('Save modal to disappear', 5000, () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Increased timeout waiting for the modal to clear
before(async () => { | ||
// clean up any left-over visualizations and tags from tests that didn't clean up after themselves | ||
await kibanaServer.savedObjects.clean({ types: ['tag', 'visualization'] }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that if previous tests hadn't cleaned up after themselves, we get a mismatch on the visualizations remaining.
@@ -77,48 +115,46 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { | |||
it('allows to manually type tag filter query', async () => { | |||
await listingTable.searchForItemWithName('tag:(tag-1)', { escape: false }); | |||
await listingTable.expectItemsCount('visualize', 2); | |||
const itemNames = await listingTable.getAllItemsNames(); | |||
const itemNames = await listingTable.getAllSelectableItemsNames(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implements selecting all visualizations by 'euiTableRow-isSelectable`
|
||
await testSubjects.click('confirmSaveSavedObjectButton'); | ||
await PageObjects.common.waitForSaveModalToClose(); | ||
await createSimpleMarkdownVis({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uses helper method
|
||
await PageObjects.visualize.gotoVisualizationLandingPage(); | ||
await listingTable.waitUntilTableIsLoaded(); | ||
|
||
await selectFilterTags('tag-1'); | ||
const itemNames = await listingTable.getAllItemsNames(); | ||
await selectFilterTags('myextratag'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot guarantee the order in which the tests in this suite will run or if any are skipped again in the future, so we use a different tag to add to an existing visualization.
await PageObjects.visualize.gotoVisualizationLandingPage(); | ||
await listingTable.waitUntilTableIsLoaded(); | ||
await PageObjects.visualize.deleteAllVisualizations(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finding all links by css-matchers takes time and causes timeouts. We clean up all the other visualizations to increase rendering speed.
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay!!! @TinaHeiligers thank you for fixing the tests!! It LGTM!
await PageObjects.visualize.ensureSavePanelOpen(); | ||
await selectSavedObjectTags('tag-2'); | ||
|
||
await selectSavedObjectTags(...['myextratag']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: do we need the spread?
await selectSavedObjectTags(...['myextratag']); | |
await selectSavedObjectTags('myextratag'); |
Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit 0b10d6c)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit 0b10d6c) Co-authored-by: Christiane (Tina) Heiligers <[email protected]>
Fix #89958
Fix #88639
Summary:
Unskips tests as these pass locally as-is without any changes to see if post-8.0 resolved the flakiness.
Note: 1/50 flaky test runs failed. Still WIP for now.
Update: Attempt2
Flaky test run succeeded 50/50 https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1428